<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
String contextPath = request.getContextPath();
String groupId = request.getParameter("tabId");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>用户组管理</title>
<jsp:include page="/inc/inc.jsp" />
<script type="text/javascript" src="jframe/sso/list/js/roleList.js"></script>
<script type="text/javascript">
var contextPath = '<%=contextPath%>';
var action = 'onlineUserAction';
$(function(){
	<%=request.getAttribute("js")%>
}); 

function del(){
	var selected = $('#grid').datagrid('getSelected');
	var id = selected.sessionId;
	if(id==""||id==null){
		alertError("请您选择要操作的记录！");
		return;
	}else{
		econfirm('警告','确定要删除所选择的数据？',function(r){
    		if(r){
    			var url = action+".do?method=removeSession";
    			$.ajax({
    				url:url,
    		 		type: 'post',
    			    data:{
    			    	id:id
    			    },
    			    dataType: 'json',
    			    error: function(){
    			        alertError('删除失败!');
    			    },
    			    success: function(data){
    			    	alertInfo('成功删除所选记录！');
    			    	$('#grid').datagrid('reload');
    			    }
    			});
    		}
    	});
	}	
}

function find(){
	var userNo = $('#userNo').val();
	var userName = $('#userName').val();
    $('#grid').datagrid('load',{
    	userNo: userNo,
    	userName:userName
   });
}

</script>
</head>
<body> 
	<div id="tb">
		 <a class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="del()">强制下线</a>
		  <span>账号：</span><input id="userNo" name="userNo" type="text" style="width: 100px;">
		  <span>账户名：</span><input id="userName" name="userName" type="text" style="width: 100px;">
		  <a class="easyui-linkbutton" plain="true" onclick="find()" iconCls="icon-search">查询</a>
	</div>
	<table id="grid" toolbar="#tb" border="0"></table>
</body>
</html>